package com.cosina.game.crystallight.model.battle.ability;

import com.cosina.game.crystallight.engine.BattleEngine;
import com.cosina.game.crystallight.engine.SpeedManager;
import com.cosina.game.crystallight.model.battle.Ability;

public class GameSpeedAbility extends Ability {

	public GameSpeedAbility() {
		this.canActive = true;
	}

	@Override
	public void doHandler() {
		BattleEngine.speedManager.swtich();
	}

	@Override
	public final int getId() {
		return Ability.ACCERLATION;
	}

	public int getFrameId() {
		if (BattleEngine.speedManager.currentSpeed == SpeedManager.SPEED_COMMON) {
			return getId();
		} else {
			return -getId();
		}
	}

	@Override
	public int needMana() {
		return 0;
	}
}
